#import <Foundation/Foundation.h>

@interface Test:NSObject
{
    int a;
    int b;
    @public int result;
}
-(void)setA:(int)a;
-(void)setB:(int)b;
-(int)getResult;
@end

@implementation Test
-(void)setA:(int)x{
    a = x;
}
-(void)setB:(int)y{
    b = y;
}
-(int)getResult{
    result = a + b;
    return result;
}
@end

int main(int argc, const char *argv[])
{
    Test *t = [[Test alloc] init];
    [t setA:10];
    [t setB:90];
    printf("result=%d\n", [t getResult]);
    printf("result=%d\n", t->result);
    [t release];
    return 0;
}